package com.homework.controller;

import com.homework.entity.Variety;
import com.homework.service.VarietyService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class VarietyController {

    @Resource
    private VarietyService varietyService;

    @RequestMapping("/findVariety")
    public List<Variety> findAll(){
        return varietyService.findAll();
    }
}
